/**
 * 
 */
package com.sogeti.mentormatch.aop;

import java.io.Serializable;

/**
 * @author Matthew L. Maurer <maurer.it@gmail.com>
 */
public interface DataAccessManager<DOBJECT, PKEY extends Serializable>
{
    public PKEY create ( DOBJECT newInstance );

    public void update ( DOBJECT transientObject );

    public void delete ( DOBJECT persistentObject );

    /**
     * Retrieve an object that was previously persisted to the database using
     * the indicated id as primary key
     */
    DOBJECT read ( PKEY id );
}
